function(add_rt_library TARGET_NAME SOURCE_FILES)
	add_library(${TARGET_NAME} SHARED ${SOURCE_FILES} func_record.c)
	target_compile_options(${TARGET_NAME} PRIVATE -fPIC)
	install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/)
endfunction()

add_rt_library(lkinDummy dummy.c)
add_rt_library(lkinData trace_data.c func_record.c)
add_rt_library(lkinStack trace_stack.c func_record.c)

#add_library(lkinDummy SHARED dummy.c)
#target_compile_options(lkinDummy PRIVATE -fPIC)
#install(TARGETS lkinDummy LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/)
#
#add_library(lkinData SHARED trace_data.c)
#target_compile_options(lkinData PRIVATE -fPIC)
#install(TARGETS lkinData LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/)
#
#add_library(lkinStack SHARED trace_stack.c)
#target_compile_options(lkinStack PRIVATE -fPIC)
#install(TARGETS lkinStack LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/)
